package com.google.code.ojar.sendtemplatemail.app.msggenerators.imp;

import java.util.List;

import com.google.code.ojar.sendtemplatemail.app.dto.Mail;
import com.google.code.ojar.sendtemplatemail.app.exception.EmailTemplateNotFound;
import com.google.code.ojar.sendtemplatemail.app.exception.MissingConfigurationException;
import com.google.code.ojar.sendtemplatemail.app.msggenerators.MsgGenerator;

public class GenericNoParamGenerator extends MsgGenerator{

	public GenericNoParamGenerator() throws MissingConfigurationException {
		super();
	}
/*
 * (non-Javadoc)
 * @see com.google.code.ojar.sendtemplatemail.app.msggenerators.MsgGenerator#generateMailMsg(java.util.List, java.util.List, java.util.List, java.lang.String[], java.lang.Integer)
 */
	@Override
	public Mail generateMailMsg(List<String> toAdds, List<String> ccAddrs,
			List<String> bccAdd, String[] args, Integer templateId) throws EmailTemplateNotFound, MissingConfigurationException {
			
			Mail object = new Mail(toAdds, ccAddrs, bccAdd);
			String subject = this.loadSubject(templateId);
			String msg = this.loadTemplate(templateId);
			object.setSubject(subject);
			object.setMsg(msg);
			
		return object;
	}


}
